//package com.gress.shop.interceptor;
//
//import com.gress.shop.vo.SwalFactory;
//import com.gress.shop.vo.SwalReturn;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import javax.servlet.http.HttpServletRequest;
//
//@ControllerAdvice
//public class GlobalExceptionHandler {
//
//    @ExceptionHandler(Exception.class)
//    @ResponseBody
//    SwalReturn handleException(Exception e, HttpServletRequest request) {
//        String s = "Exception Deal!" + e.getMessage();
//        return SwalFactory.getErrorSwal(s);
//    }
//}